package com.adaxi.adc.business.passengertrip.feign;
import com.adaxi.adc.common.constant.Constants;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.context.annotation.Configuration;

/**
 * @author hanjinqun
 * @date 2022/11/7
 */
@Configuration
public class FeignConfiguration  implements RequestInterceptor {

    /**
     * 添加请求头，否则会禁止翻墙
     * @param requestTemplate
     */
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header(Constants.GATEWAY_WALL_HEADER_NAME,Constants.GATEWAY_WALL_HEADER_VALUE);
    }
}
